3.2.96 \(\int \frac {(a+b \sec (e+f x))^3}{(c+d \sec (e+f x))^4} \, dx\) [196]

3.2.96.1 Optimal result
3.2.96.2 Mathematica [A] (verified)
3.2.96.3 Rubi [A] (verified)
3.2.96.4 Maple [A] (verified)
3.2.96.5 Fricas [B] (verification not implemented)
3.2.96.6 Sympy [F]
3.2.96.7 Maxima [F(-2)]
3.2.96.8 Giac [B] (verification not implemented)
3.2.96.9 Mupad [B] (verification not implemented)

3.2.96.1 Optimal result

Integrand size = 25, antiderivative size = 412 \[ \int \frac {(a+b \sec (e+f x))^3}{(c+d \sec (e+f x))^4} \, dx=\frac {a^3 x}{c^4}-\frac {\left (3 a b^2 c^4 d \left (4 c^2+d^2\right )-b^3 c^5 \left (c^2+4 d^2\right )-a^2 b \left (6 c^7+9 c^5 d^2\right )+a^3 \left (8 c^6 d-8 c^4 d^3+7 c^2 d^5-2 d^7\right )\right ) \text {arctanh}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{c^4 \sqrt {c-d} \sqrt {c+d} \left (c^2-d^2\right )^3 f}-\frac {d (b c-a d) (b+a \cos (e+f x))^2 \sin (e+f x)}{3 c \left (c^2-d^2\right ) f (d+c \cos (e+f x))^3}+\frac {(b c-a d)^2 \left (3 b c^3-8 a c^2 d+2 b c d^2+3 a d^3\right ) \sin (e+f x)}{6 c^3 \left (c^2-d^2\right )^2 f (d+c \cos (e+f x))^2}-\frac {(b c-a d) \left (b^2 c^2 d \left (13 c^2+2 d^2\right )-a b c \left (18 c^4+17 c^2 d^2-5 d^4\right )+a^2 \left (34 c^4 d-28 c^2 d^3+9 d^5\right )\right ) \sin (e+f x)}{6 c^3 \left (c^2-d^2\right )^3 f (d+c \cos (e+f x))} \]

output
a^3*x/c^4-1/3*d*(-a*d+b*c)*(b+a*cos(f*x+e))^2*sin(f*x+e)/c/(c^2-d^2)/f/(d+ 
c*cos(f*x+e))^3+1/6*(-a*d+b*c)^2*(-8*a*c^2*d+3*a*d^3+3*b*c^3+2*b*c*d^2)*si 
n(f*x+e)/c^3/(c^2-d^2)^2/f/(d+c*cos(f*x+e))^2-1/6*(-a*d+b*c)*(b^2*c^2*d*(1 
3*c^2+2*d^2)-a*b*c*(18*c^4+17*c^2*d^2-5*d^4)+a^2*(34*c^4*d-28*c^2*d^3+9*d^ 
5))*sin(f*x+e)/c^3/(c^2-d^2)^3/f/(d+c*cos(f*x+e))-(3*a*b^2*c^4*d*(4*c^2+d^ 
2)-b^3*c^5*(c^2+4*d^2)-a^2*b*(6*c^7+9*c^5*d^2)+a^3*(8*c^6*d-8*c^4*d^3+7*c^ 
2*d^5-2*d^7))*arctanh((c-d)^(1/2)*tan(1/2*f*x+1/2*e)/(c+d)^(1/2))/c^4/(c^2 
-d^2)^3/f/(c-d)^(1/2)/(c+d)^(1/2)
 
3.2.96.2 Mathematica [A] (verified)

Time = 5.39 (sec) , antiderivative size = 459, normalized size of antiderivative = 1.11 \[ \int \frac {(a+b \sec (e+f x))^3}{(c+d \sec (e+f x))^4} \, dx=\frac {(d+c \cos (e+f x)) \sec (e+f x) (a+b \sec (e+f x))^3 \left (6 a^3 (e+f x) (d+c \cos (e+f x))^3-\frac {6 \left (-3 a b^2 c^4 d \left (4 c^2+d^2\right )+b^3 c^5 \left (c^2+4 d^2\right )+a^2 b \left (6 c^7+9 c^5 d^2\right )+a^3 \left (-8 c^6 d+8 c^4 d^3-7 c^2 d^5+2 d^7\right )\right ) \text {arctanh}\left (\frac {(-c+d) \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c^2-d^2}}\right ) (d+c \cos (e+f x))^3}{\left (c^2-d^2\right )^{7/2}}-\frac {2 c d (b c-a d)^3 \sin (e+f x)}{c^2-d^2}+\frac {c (b c-a d)^2 \left (3 b c^3-12 a c^2 d+2 b c d^2+7 a d^3\right ) (d+c \cos (e+f x)) \sin (e+f x)}{\left (c^2-d^2\right )^2}+\frac {c \left (-b^3 c^3 d \left (13 c^2+2 d^2\right )+3 a b^2 c^2 \left (6 c^4+10 c^2 d^2-d^4\right )-3 a^2 b c d \left (18 c^4-5 c^2 d^2+2 d^4\right )+a^3 \left (36 c^4 d^2-32 c^2 d^4+11 d^6\right )\right ) (d+c \cos (e+f x))^2 \sin (e+f x)}{\left (c^2-d^2\right )^3}\right )}{6 c^4 f (b+a \cos (e+f x))^3 (c+d \sec (e+f x))^4} \]

input
Integrate[(a + b*Sec[e + f*x])^3/(c + d*Sec[e + f*x])^4,x]
 
output
((d + c*Cos[e + f*x])*Sec[e + f*x]*(a + b*Sec[e + f*x])^3*(6*a^3*(e + f*x) 
*(d + c*Cos[e + f*x])^3 - (6*(-3*a*b^2*c^4*d*(4*c^2 + d^2) + b^3*c^5*(c^2 
+ 4*d^2) + a^2*b*(6*c^7 + 9*c^5*d^2) + a^3*(-8*c^6*d + 8*c^4*d^3 - 7*c^2*d 
^5 + 2*d^7))*ArcTanh[((-c + d)*Tan[(e + f*x)/2])/Sqrt[c^2 - d^2]]*(d + c*C 
os[e + f*x])^3)/(c^2 - d^2)^(7/2) - (2*c*d*(b*c - a*d)^3*Sin[e + f*x])/(c^ 
2 - d^2) + (c*(b*c - a*d)^2*(3*b*c^3 - 12*a*c^2*d + 2*b*c*d^2 + 7*a*d^3)*( 
d + c*Cos[e + f*x])*Sin[e + f*x])/(c^2 - d^2)^2 + (c*(-(b^3*c^3*d*(13*c^2 
+ 2*d^2)) + 3*a*b^2*c^2*(6*c^4 + 10*c^2*d^2 - d^4) - 3*a^2*b*c*d*(18*c^4 - 
 5*c^2*d^2 + 2*d^4) + a^3*(36*c^4*d^2 - 32*c^2*d^4 + 11*d^6))*(d + c*Cos[e 
 + f*x])^2*Sin[e + f*x])/(c^2 - d^2)^3))/(6*c^4*f*(b + a*Cos[e + f*x])^3*( 
c + d*Sec[e + f*x])^4)
 
3.2.96.3 Rubi [A] (verified)

Time = 1.99 (sec) , antiderivative size = 463, normalized size of antiderivative = 1.12, number of steps used = 15, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.560, Rules used = {3042, 4429, 3042, 3468, 3042, 3510, 3042, 3500, 27, 3042, 3214, 3042, 3138, 221}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(a+b \sec (e+f x))^3}{(c+d \sec (e+f x))^4} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\left (a+b \csc \left (e+f x+\frac {\pi }{2}\right )\right )^3}{\left (c+d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^4}dx\)

\(\Big \downarrow \) 4429

\(\displaystyle \int \frac {\cos (e+f x) (a \cos (e+f x)+b)^3}{(c \cos (e+f x)+d)^4}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sin \left (e+f x+\frac {\pi }{2}\right ) \left (a \sin \left (e+f x+\frac {\pi }{2}\right )+b\right )^3}{\left (c \sin \left (e+f x+\frac {\pi }{2}\right )+d\right )^4}dx\)

\(\Big \downarrow \) 3468

\(\displaystyle \frac {\int \frac {(b+a \cos (e+f x)) \left (3 a^2 \left (c^2-d^2\right ) \cos ^2(e+f x)-\left (3 c d a^2-b \left (6 c^2-d^2\right ) a+2 b^2 c d\right ) \cos (e+f x)+(3 b c-2 a d) (b c-a d)\right )}{(d+c \cos (e+f x))^3}dx}{3 c \left (c^2-d^2\right )}-\frac {d (b c-a d) \sin (e+f x) (a \cos (e+f x)+b)^2}{3 c f \left (c^2-d^2\right ) (c \cos (e+f x)+d)^3}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \frac {\left (b+a \sin \left (e+f x+\frac {\pi }{2}\right )\right ) \left (3 a^2 \left (c^2-d^2\right ) \sin \left (e+f x+\frac {\pi }{2}\right )^2+\left (-3 c d a^2+b \left (6 c^2-d^2\right ) a-2 b^2 c d\right ) \sin \left (e+f x+\frac {\pi }{2}\right )+(3 b c-2 a d) (b c-a d)\right )}{\left (d+c \sin \left (e+f x+\frac {\pi }{2}\right )\right )^3}dx}{3 c \left (c^2-d^2\right )}-\frac {d (b c-a d) \sin (e+f x) (a \cos (e+f x)+b)^2}{3 c f \left (c^2-d^2\right ) (c \cos (e+f x)+d)^3}\)

\(\Big \downarrow \) 3510

\(\displaystyle \frac {\frac {(b c-a d)^2 \left (-8 a c^2 d+3 a d^3+3 b c^3+2 b c d^2\right ) \sin (e+f x)}{2 c^2 f \left (c^2-d^2\right ) (c \cos (e+f x)+d)^2}-\frac {\int \frac {-6 c \left (c^2-d^2\right )^2 \cos ^2(e+f x) a^3+2 c (b c-a d) \left (\left (8 c^2 d-3 d^3\right ) a^2-b c \left (9 c^2+d^2\right ) a+5 b^2 c^2 d\right )+\left (\left (3 d^5-10 c^2 d^3+12 c^4 d\right ) a^3-b c \left (18 c^4-7 d^2 c^2+4 d^4\right ) a^2+3 b^2 c^2 d \left (6 c^2-d^2\right ) a-b^3 c^3 \left (3 c^2+2 d^2\right )\right ) \cos (e+f x)}{(d+c \cos (e+f x))^2}dx}{2 c^2 \left (c^2-d^2\right )}}{3 c \left (c^2-d^2\right )}-\frac {d (b c-a d) \sin (e+f x) (a \cos (e+f x)+b)^2}{3 c f \left (c^2-d^2\right ) (c \cos (e+f x)+d)^3}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {(b c-a d)^2 \left (-8 a c^2 d+3 a d^3+3 b c^3+2 b c d^2\right ) \sin (e+f x)}{2 c^2 f \left (c^2-d^2\right ) (c \cos (e+f x)+d)^2}-\frac {\int \frac {-6 c \left (c^2-d^2\right )^2 \sin \left (e+f x+\frac {\pi }{2}\right )^2 a^3+2 c (b c-a d) \left (\left (8 c^2 d-3 d^3\right ) a^2-b c \left (9 c^2+d^2\right ) a+5 b^2 c^2 d\right )+\left (\left (3 d^5-10 c^2 d^3+12 c^4 d\right ) a^3-b c \left (18 c^4-7 d^2 c^2+4 d^4\right ) a^2+3 b^2 c^2 d \left (6 c^2-d^2\right ) a-b^3 c^3 \left (3 c^2+2 d^2\right )\right ) \sin \left (e+f x+\frac {\pi }{2}\right )}{\left (d+c \sin \left (e+f x+\frac {\pi }{2}\right )\right )^2}dx}{2 c^2 \left (c^2-d^2\right )}}{3 c \left (c^2-d^2\right )}-\frac {d (b c-a d) \sin (e+f x) (a \cos (e+f x)+b)^2}{3 c f \left (c^2-d^2\right ) (c \cos (e+f x)+d)^3}\)

\(\Big \downarrow \) 3500

\(\displaystyle \frac {\frac {(b c-a d)^2 \left (-8 a c^2 d+3 a d^3+3 b c^3+2 b c d^2\right ) \sin (e+f x)}{2 c^2 f \left (c^2-d^2\right ) (c \cos (e+f x)+d)^2}-\frac {\frac {\int \frac {3 \left (c^2 (b c-a d) \left (-\left (\left (6 c^4-2 d^2 c^2+d^4\right ) a^2\right )+b c d \left (11 c^2-d^2\right ) a-b^2 c^2 \left (c^2+4 d^2\right )\right )-2 a^3 c \left (c^2-d^2\right )^3 \cos (e+f x)\right )}{d+c \cos (e+f x)}dx}{c \left (c^2-d^2\right )}-\frac {(b c-a d) \left (-34 a^2 c^4 d+28 a^2 c^2 d^3-9 a^2 d^5+18 a b c^5+17 a b c^3 d^2-5 a b c d^4-13 b^2 c^4 d-2 b^2 c^2 d^3\right ) \sin (e+f x)}{f \left (c^2-d^2\right ) (c \cos (e+f x)+d)}}{2 c^2 \left (c^2-d^2\right )}}{3 c \left (c^2-d^2\right )}-\frac {d (b c-a d) \sin (e+f x) (a \cos (e+f x)+b)^2}{3 c f \left (c^2-d^2\right ) (c \cos (e+f x)+d)^3}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\frac {(b c-a d)^2 \left (-8 a c^2 d+3 a d^3+3 b c^3+2 b c d^2\right ) \sin (e+f x)}{2 c^2 f \left (c^2-d^2\right ) (c \cos (e+f x)+d)^2}-\frac {\frac {3 \int \frac {c^2 (b c-a d) \left (-\left (\left (6 c^4-2 d^2 c^2+d^4\right ) a^2\right )+b c d \left (11 c^2-d^2\right ) a-b^2 c^2 \left (c^2+4 d^2\right )\right )-2 a^3 c \left (c^2-d^2\right )^3 \cos (e+f x)}{d+c \cos (e+f x)}dx}{c \left (c^2-d^2\right )}-\frac {(b c-a d) \left (-34 a^2 c^4 d+28 a^2 c^2 d^3-9 a^2 d^5+18 a b c^5+17 a b c^3 d^2-5 a b c d^4-13 b^2 c^4 d-2 b^2 c^2 d^3\right ) \sin (e+f x)}{f \left (c^2-d^2\right ) (c \cos (e+f x)+d)}}{2 c^2 \left (c^2-d^2\right )}}{3 c \left (c^2-d^2\right )}-\frac {d (b c-a d) \sin (e+f x) (a \cos (e+f x)+b)^2}{3 c f \left (c^2-d^2\right ) (c \cos (e+f x)+d)^3}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {(b c-a d)^2 \left (-8 a c^2 d+3 a d^3+3 b c^3+2 b c d^2\right ) \sin (e+f x)}{2 c^2 f \left (c^2-d^2\right ) (c \cos (e+f x)+d)^2}-\frac {\frac {3 \int \frac {c^2 (b c-a d) \left (-\left (\left (6 c^4-2 d^2 c^2+d^4\right ) a^2\right )+b c d \left (11 c^2-d^2\right ) a-b^2 c^2 \left (c^2+4 d^2\right )\right )-2 a^3 c \left (c^2-d^2\right )^3 \sin \left (e+f x+\frac {\pi }{2}\right )}{d+c \sin \left (e+f x+\frac {\pi }{2}\right )}dx}{c \left (c^2-d^2\right )}-\frac {(b c-a d) \left (-34 a^2 c^4 d+28 a^2 c^2 d^3-9 a^2 d^5+18 a b c^5+17 a b c^3 d^2-5 a b c d^4-13 b^2 c^4 d-2 b^2 c^2 d^3\right ) \sin (e+f x)}{f \left (c^2-d^2\right ) (c \cos (e+f x)+d)}}{2 c^2 \left (c^2-d^2\right )}}{3 c \left (c^2-d^2\right )}-\frac {d (b c-a d) \sin (e+f x) (a \cos (e+f x)+b)^2}{3 c f \left (c^2-d^2\right ) (c \cos (e+f x)+d)^3}\)

\(\Big \downarrow \) 3214

\(\displaystyle \frac {\frac {(b c-a d)^2 \left (-8 a c^2 d+3 a d^3+3 b c^3+2 b c d^2\right ) \sin (e+f x)}{2 c^2 f \left (c^2-d^2\right ) (c \cos (e+f x)+d)^2}-\frac {\frac {3 \left (\left (a^3 \left (8 c^6 d-8 c^4 d^3+7 c^2 d^5-2 d^7\right )-3 a^2 b c^5 \left (2 c^2+3 d^2\right )+3 a b^2 c^4 d \left (4 c^2+d^2\right )-b^3 c^5 \left (c^2+4 d^2\right )\right ) \int \frac {1}{d+c \cos (e+f x)}dx-2 a^3 x \left (c^2-d^2\right )^3\right )}{c \left (c^2-d^2\right )}-\frac {(b c-a d) \left (-34 a^2 c^4 d+28 a^2 c^2 d^3-9 a^2 d^5+18 a b c^5+17 a b c^3 d^2-5 a b c d^4-13 b^2 c^4 d-2 b^2 c^2 d^3\right ) \sin (e+f x)}{f \left (c^2-d^2\right ) (c \cos (e+f x)+d)}}{2 c^2 \left (c^2-d^2\right )}}{3 c \left (c^2-d^2\right )}-\frac {d (b c-a d) \sin (e+f x) (a \cos (e+f x)+b)^2}{3 c f \left (c^2-d^2\right ) (c \cos (e+f x)+d)^3}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {(b c-a d)^2 \left (-8 a c^2 d+3 a d^3+3 b c^3+2 b c d^2\right ) \sin (e+f x)}{2 c^2 f \left (c^2-d^2\right ) (c \cos (e+f x)+d)^2}-\frac {\frac {3 \left (\left (a^3 \left (8 c^6 d-8 c^4 d^3+7 c^2 d^5-2 d^7\right )-3 a^2 b c^5 \left (2 c^2+3 d^2\right )+3 a b^2 c^4 d \left (4 c^2+d^2\right )-b^3 c^5 \left (c^2+4 d^2\right )\right ) \int \frac {1}{d+c \sin \left (e+f x+\frac {\pi }{2}\right )}dx-2 a^3 x \left (c^2-d^2\right )^3\right )}{c \left (c^2-d^2\right )}-\frac {(b c-a d) \left (-34 a^2 c^4 d+28 a^2 c^2 d^3-9 a^2 d^5+18 a b c^5+17 a b c^3 d^2-5 a b c d^4-13 b^2 c^4 d-2 b^2 c^2 d^3\right ) \sin (e+f x)}{f \left (c^2-d^2\right ) (c \cos (e+f x)+d)}}{2 c^2 \left (c^2-d^2\right )}}{3 c \left (c^2-d^2\right )}-\frac {d (b c-a d) \sin (e+f x) (a \cos (e+f x)+b)^2}{3 c f \left (c^2-d^2\right ) (c \cos (e+f x)+d)^3}\)

\(\Big \downarrow \) 3138

\(\displaystyle \frac {\frac {(b c-a d)^2 \left (-8 a c^2 d+3 a d^3+3 b c^3+2 b c d^2\right ) \sin (e+f x)}{2 c^2 f \left (c^2-d^2\right ) (c \cos (e+f x)+d)^2}-\frac {\frac {3 \left (\frac {2 \left (a^3 \left (8 c^6 d-8 c^4 d^3+7 c^2 d^5-2 d^7\right )-3 a^2 b c^5 \left (2 c^2+3 d^2\right )+3 a b^2 c^4 d \left (4 c^2+d^2\right )-b^3 c^5 \left (c^2+4 d^2\right )\right ) \int \frac {1}{-\left ((c-d) \tan ^2\left (\frac {1}{2} (e+f x)\right )\right )+c+d}d\tan \left (\frac {1}{2} (e+f x)\right )}{f}-2 a^3 x \left (c^2-d^2\right )^3\right )}{c \left (c^2-d^2\right )}-\frac {(b c-a d) \left (-34 a^2 c^4 d+28 a^2 c^2 d^3-9 a^2 d^5+18 a b c^5+17 a b c^3 d^2-5 a b c d^4-13 b^2 c^4 d-2 b^2 c^2 d^3\right ) \sin (e+f x)}{f \left (c^2-d^2\right ) (c \cos (e+f x)+d)}}{2 c^2 \left (c^2-d^2\right )}}{3 c \left (c^2-d^2\right )}-\frac {d (b c-a d) \sin (e+f x) (a \cos (e+f x)+b)^2}{3 c f \left (c^2-d^2\right ) (c \cos (e+f x)+d)^3}\)

\(\Big \downarrow \) 221

\(\displaystyle \frac {\frac {(b c-a d)^2 \left (-8 a c^2 d+3 a d^3+3 b c^3+2 b c d^2\right ) \sin (e+f x)}{2 c^2 f \left (c^2-d^2\right ) (c \cos (e+f x)+d)^2}-\frac {\frac {3 \left (\frac {2 \left (a^3 \left (8 c^6 d-8 c^4 d^3+7 c^2 d^5-2 d^7\right )-3 a^2 b c^5 \left (2 c^2+3 d^2\right )+3 a b^2 c^4 d \left (4 c^2+d^2\right )-b^3 c^5 \left (c^2+4 d^2\right )\right ) \text {arctanh}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{f \sqrt {c-d} \sqrt {c+d}}-2 a^3 x \left (c^2-d^2\right )^3\right )}{c \left (c^2-d^2\right )}-\frac {(b c-a d) \left (-34 a^2 c^4 d+28 a^2 c^2 d^3-9 a^2 d^5+18 a b c^5+17 a b c^3 d^2-5 a b c d^4-13 b^2 c^4 d-2 b^2 c^2 d^3\right ) \sin (e+f x)}{f \left (c^2-d^2\right ) (c \cos (e+f x)+d)}}{2 c^2 \left (c^2-d^2\right )}}{3 c \left (c^2-d^2\right )}-\frac {d (b c-a d) \sin (e+f x) (a \cos (e+f x)+b)^2}{3 c f \left (c^2-d^2\right ) (c \cos (e+f x)+d)^3}\)

input
Int[(a + b*Sec[e + f*x])^3/(c + d*Sec[e + f*x])^4,x]
 
output
-1/3*(d*(b*c - a*d)*(b + a*Cos[e + f*x])^2*Sin[e + f*x])/(c*(c^2 - d^2)*f* 
(d + c*Cos[e + f*x])^3) + (((b*c - a*d)^2*(3*b*c^3 - 8*a*c^2*d + 2*b*c*d^2 
 + 3*a*d^3)*Sin[e + f*x])/(2*c^2*(c^2 - d^2)*f*(d + c*Cos[e + f*x])^2) - ( 
(3*(-2*a^3*(c^2 - d^2)^3*x + (2*(3*a*b^2*c^4*d*(4*c^2 + d^2) - 3*a^2*b*c^5 
*(2*c^2 + 3*d^2) - b^3*c^5*(c^2 + 4*d^2) + a^3*(8*c^6*d - 8*c^4*d^3 + 7*c^ 
2*d^5 - 2*d^7))*ArcTanh[(Sqrt[c - d]*Tan[(e + f*x)/2])/Sqrt[c + d]])/(Sqrt 
[c - d]*Sqrt[c + d]*f)))/(c*(c^2 - d^2)) - ((b*c - a*d)*(18*a*b*c^5 - 34*a 
^2*c^4*d - 13*b^2*c^4*d + 17*a*b*c^3*d^2 + 28*a^2*c^2*d^3 - 2*b^2*c^2*d^3 
- 5*a*b*c*d^4 - 9*a^2*d^5)*Sin[e + f*x])/((c^2 - d^2)*f*(d + c*Cos[e + f*x 
])))/(2*c^2*(c^2 - d^2)))/(3*c*(c^2 - d^2))
 

3.2.96.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 221
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x 
/Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3138
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ 
e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d)   Subst[Int[1/(a + b + 
(a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] 
 && NeQ[a^2 - b^2, 0]
 

rule 3214
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_. 
)*(x_)]), x_Symbol] :> Simp[b*(x/d), x] - Simp[(b*c - a*d)/d   Int[1/(c + d 
*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
 

rule 3468
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + 
 (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Si 
mp[(-(b*c - a*d))*(B*c - A*d)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m - 1)*((c 
 + d*Sin[e + f*x])^(n + 1)/(d*f*(n + 1)*(c^2 - d^2))), x] + Simp[1/(d*(n + 
1)*(c^2 - d^2))   Int[(a + b*Sin[e + f*x])^(m - 2)*(c + d*Sin[e + f*x])^(n 
+ 1)*Simp[b*(b*c - a*d)*(B*c - A*d)*(m - 1) + a*d*(a*A*c + b*B*c - (A*b + a 
*B)*d)*(n + 1) + (b*(b*d*(B*c - A*d) + a*(A*c*d + B*(c^2 - 2*d^2)))*(n + 1) 
 - a*(b*c - a*d)*(B*c - A*d)*(n + 2))*Sin[e + f*x] + b*(d*(A*b*c + a*B*c - 
a*A*d)*(m + n + 1) - b*B*(c^2*m + d^2*(n + 1)))*Sin[e + f*x]^2, x], x], x] 
/; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2 
, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 1] && LtQ[n, -1]
 

rule 3500
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + 
 (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(A*b^2 
 - a*b*B + a^2*C))*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 1)* 
(a^2 - b^2))), x] + Simp[1/(b*(m + 1)*(a^2 - b^2))   Int[(a + b*Sin[e + f*x 
])^(m + 1)*Simp[b*(a*A - b*B + a*C)*(m + 1) - (A*b^2 - a*b*B + a^2*C + b*(A 
*b - a*B + b*C)*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, 
B, C}, x] && LtQ[m, -1] && NeQ[a^2 - b^2, 0]
 

rule 3510
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + 
 (f_.)*(x_)])*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f 
_.)*(x_)]^2), x_Symbol] :> Simp[(-(b*c - a*d))*(A*b^2 - a*b*B + a^2*C)*Cos[ 
e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b^2*f*(m + 1)*(a^2 - b^2))), x] - S 
imp[1/(b^2*(m + 1)*(a^2 - b^2))   Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[b*( 
m + 1)*((b*B - a*C)*(b*c - a*d) - A*b*(a*c - b*d)) + (b*B*(a^2*d + b^2*d*(m 
 + 1) - a*b*c*(m + 2)) + (b*c - a*d)*(A*b^2*(m + 2) + C*(a^2 + b^2*(m + 1)) 
))*Sin[e + f*x] - b*C*d*(m + 1)*(a^2 - b^2)*Sin[e + f*x]^2, x], x], x] /; F 
reeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 
 0] && LtQ[m, -1]
 

rule 4429
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(d 
_.) + (c_))^(n_), x_Symbol] :> Int[(b + a*Sin[e + f*x])^m*((d + c*Sin[e + f 
*x])^n/Sin[e + f*x]^(m + n)), x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && N 
eQ[b*c - a*d, 0] && IntegerQ[m] && IntegerQ[n] && LeQ[-2, m + n, 0]
 
3.2.96.4 Maple [A] (verified)

Time = 1.34 (sec) , antiderivative size = 785, normalized size of antiderivative = 1.91

method result size
derivativedivides \(\frac {\frac {2 a^{3} \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c^{4}}+\frac {\frac {2 \left (-\frac {\left (12 a^{3} c^{4} d^{2}+4 a^{3} c^{3} d^{3}-6 a^{3} c^{2} d^{4}-a^{3} c \,d^{5}+2 a^{3} d^{6}-18 a^{2} b \,c^{5} d -9 a^{2} b \,c^{4} d^{2}-6 a^{2} b \,c^{3} d^{3}+6 a \,b^{2} c^{6}+6 a \,b^{2} c^{5} d +18 a \,b^{2} c^{4} d^{2}+3 a \,b^{2} c^{3} d^{3}-b^{3} c^{6}-6 b^{3} c^{5} d -2 b^{3} c^{4} d^{2}-2 b^{3} c^{3} d^{3}\right ) c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{2 \left (c -d \right ) \left (c^{3}+3 c^{2} d +3 c \,d^{2}+d^{3}\right )}+\frac {2 \left (18 a^{3} c^{4} d^{2}-11 a^{3} c^{2} d^{4}+3 a^{3} d^{6}-27 a^{2} b \,c^{5} d -3 a^{2} b \,c^{3} d^{3}+9 a \,b^{2} c^{6}+21 a \,b^{2} c^{4} d^{2}-7 b^{3} c^{5} d -3 b^{3} c^{3} d^{3}\right ) c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3 \left (c^{2}-2 c d +d^{2}\right ) \left (c^{2}+2 c d +d^{2}\right )}-\frac {\left (12 a^{3} c^{4} d^{2}-4 a^{3} c^{3} d^{3}-6 a^{3} c^{2} d^{4}+a^{3} c \,d^{5}+2 a^{3} d^{6}-18 a^{2} b \,c^{5} d +9 a^{2} b \,c^{4} d^{2}-6 a^{2} b \,c^{3} d^{3}+6 a \,b^{2} c^{6}-6 a \,b^{2} c^{5} d +18 a \,b^{2} c^{4} d^{2}-3 a \,b^{2} c^{3} d^{3}+b^{3} c^{6}-6 b^{3} c^{5} d +2 b^{3} c^{4} d^{2}-2 b^{3} c^{3} d^{3}\right ) c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 \left (c +d \right ) \left (c^{3}-3 c^{2} d +3 c \,d^{2}-d^{3}\right )}\right )}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} c -\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} d -c -d \right )^{3}}-\frac {\left (8 a^{3} c^{6} d -8 a^{3} c^{4} d^{3}+7 a^{3} c^{2} d^{5}-2 a^{3} d^{7}-6 a^{2} b \,c^{7}-9 a^{2} b \,c^{5} d^{2}+12 a \,b^{2} c^{6} d +3 a \,b^{2} c^{4} d^{3}-b^{3} c^{7}-4 b^{3} c^{5} d^{2}\right ) \operatorname {arctanh}\left (\frac {\left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{\left (c^{6}-3 c^{4} d^{2}+3 c^{2} d^{4}-d^{6}\right ) \sqrt {\left (c +d \right ) \left (c -d \right )}}}{c^{4}}}{f}\) \(785\)
default \(\frac {\frac {2 a^{3} \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c^{4}}+\frac {\frac {2 \left (-\frac {\left (12 a^{3} c^{4} d^{2}+4 a^{3} c^{3} d^{3}-6 a^{3} c^{2} d^{4}-a^{3} c \,d^{5}+2 a^{3} d^{6}-18 a^{2} b \,c^{5} d -9 a^{2} b \,c^{4} d^{2}-6 a^{2} b \,c^{3} d^{3}+6 a \,b^{2} c^{6}+6 a \,b^{2} c^{5} d +18 a \,b^{2} c^{4} d^{2}+3 a \,b^{2} c^{3} d^{3}-b^{3} c^{6}-6 b^{3} c^{5} d -2 b^{3} c^{4} d^{2}-2 b^{3} c^{3} d^{3}\right ) c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{2 \left (c -d \right ) \left (c^{3}+3 c^{2} d +3 c \,d^{2}+d^{3}\right )}+\frac {2 \left (18 a^{3} c^{4} d^{2}-11 a^{3} c^{2} d^{4}+3 a^{3} d^{6}-27 a^{2} b \,c^{5} d -3 a^{2} b \,c^{3} d^{3}+9 a \,b^{2} c^{6}+21 a \,b^{2} c^{4} d^{2}-7 b^{3} c^{5} d -3 b^{3} c^{3} d^{3}\right ) c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3 \left (c^{2}-2 c d +d^{2}\right ) \left (c^{2}+2 c d +d^{2}\right )}-\frac {\left (12 a^{3} c^{4} d^{2}-4 a^{3} c^{3} d^{3}-6 a^{3} c^{2} d^{4}+a^{3} c \,d^{5}+2 a^{3} d^{6}-18 a^{2} b \,c^{5} d +9 a^{2} b \,c^{4} d^{2}-6 a^{2} b \,c^{3} d^{3}+6 a \,b^{2} c^{6}-6 a \,b^{2} c^{5} d +18 a \,b^{2} c^{4} d^{2}-3 a \,b^{2} c^{3} d^{3}+b^{3} c^{6}-6 b^{3} c^{5} d +2 b^{3} c^{4} d^{2}-2 b^{3} c^{3} d^{3}\right ) c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 \left (c +d \right ) \left (c^{3}-3 c^{2} d +3 c \,d^{2}-d^{3}\right )}\right )}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} c -\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} d -c -d \right )^{3}}-\frac {\left (8 a^{3} c^{6} d -8 a^{3} c^{4} d^{3}+7 a^{3} c^{2} d^{5}-2 a^{3} d^{7}-6 a^{2} b \,c^{7}-9 a^{2} b \,c^{5} d^{2}+12 a \,b^{2} c^{6} d +3 a \,b^{2} c^{4} d^{3}-b^{3} c^{7}-4 b^{3} c^{5} d^{2}\right ) \operatorname {arctanh}\left (\frac {\left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{\left (c^{6}-3 c^{4} d^{2}+3 c^{2} d^{4}-d^{6}\right ) \sqrt {\left (c +d \right ) \left (c -d \right )}}}{c^{4}}}{f}\) \(785\)
risch \(\text {Expression too large to display}\) \(3245\)

input
int((a+b*sec(f*x+e))^3/(c+d*sec(f*x+e))^4,x,method=_RETURNVERBOSE)
 
output
1/f*(2*a^3/c^4*arctan(tan(1/2*f*x+1/2*e))+2/c^4*((-1/2*(12*a^3*c^4*d^2+4*a 
^3*c^3*d^3-6*a^3*c^2*d^4-a^3*c*d^5+2*a^3*d^6-18*a^2*b*c^5*d-9*a^2*b*c^4*d^ 
2-6*a^2*b*c^3*d^3+6*a*b^2*c^6+6*a*b^2*c^5*d+18*a*b^2*c^4*d^2+3*a*b^2*c^3*d 
^3-b^3*c^6-6*b^3*c^5*d-2*b^3*c^4*d^2-2*b^3*c^3*d^3)*c/(c-d)/(c^3+3*c^2*d+3 
*c*d^2+d^3)*tan(1/2*f*x+1/2*e)^5+2/3*(18*a^3*c^4*d^2-11*a^3*c^2*d^4+3*a^3* 
d^6-27*a^2*b*c^5*d-3*a^2*b*c^3*d^3+9*a*b^2*c^6+21*a*b^2*c^4*d^2-7*b^3*c^5* 
d-3*b^3*c^3*d^3)*c/(c^2-2*c*d+d^2)/(c^2+2*c*d+d^2)*tan(1/2*f*x+1/2*e)^3-1/ 
2*(12*a^3*c^4*d^2-4*a^3*c^3*d^3-6*a^3*c^2*d^4+a^3*c*d^5+2*a^3*d^6-18*a^2*b 
*c^5*d+9*a^2*b*c^4*d^2-6*a^2*b*c^3*d^3+6*a*b^2*c^6-6*a*b^2*c^5*d+18*a*b^2* 
c^4*d^2-3*a*b^2*c^3*d^3+b^3*c^6-6*b^3*c^5*d+2*b^3*c^4*d^2-2*b^3*c^3*d^3)*c 
/(c+d)/(c^3-3*c^2*d+3*c*d^2-d^3)*tan(1/2*f*x+1/2*e))/(tan(1/2*f*x+1/2*e)^2 
*c-tan(1/2*f*x+1/2*e)^2*d-c-d)^3-1/2*(8*a^3*c^6*d-8*a^3*c^4*d^3+7*a^3*c^2* 
d^5-2*a^3*d^7-6*a^2*b*c^7-9*a^2*b*c^5*d^2+12*a*b^2*c^6*d+3*a*b^2*c^4*d^3-b 
^3*c^7-4*b^3*c^5*d^2)/(c^6-3*c^4*d^2+3*c^2*d^4-d^6)/((c+d)*(c-d))^(1/2)*ar 
ctanh((c-d)*tan(1/2*f*x+1/2*e)/((c+d)*(c-d))^(1/2))))
 
3.2.96.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1359 vs. \(2 (396) = 792\).

Time = 0.48 (sec) , antiderivative size = 2776, normalized size of antiderivative = 6.74 \[ \int \frac {(a+b \sec (e+f x))^3}{(c+d \sec (e+f x))^4} \, dx=\text {Too large to display} \]

input
integrate((a+b*sec(f*x+e))^3/(c+d*sec(f*x+e))^4,x, algorithm="fricas")
 
output
[1/12*(12*(a^3*c^11 - 4*a^3*c^9*d^2 + 6*a^3*c^7*d^4 - 4*a^3*c^5*d^6 + a^3* 
c^3*d^8)*f*x*cos(f*x + e)^3 + 36*(a^3*c^10*d - 4*a^3*c^8*d^3 + 6*a^3*c^6*d 
^5 - 4*a^3*c^4*d^7 + a^3*c^2*d^9)*f*x*cos(f*x + e)^2 + 36*(a^3*c^9*d^2 - 4 
*a^3*c^7*d^4 + 6*a^3*c^5*d^6 - 4*a^3*c^3*d^8 + a^3*c*d^10)*f*x*cos(f*x + e 
) + 12*(a^3*c^8*d^3 - 4*a^3*c^6*d^5 + 6*a^3*c^4*d^7 - 4*a^3*c^2*d^9 + a^3* 
d^11)*f*x + 3*(7*a^3*c^2*d^8 - 2*a^3*d^10 - (6*a^2*b + b^3)*c^7*d^3 + 4*(2 
*a^3 + 3*a*b^2)*c^6*d^4 - (9*a^2*b + 4*b^3)*c^5*d^5 - (8*a^3 - 3*a*b^2)*c^ 
4*d^6 + (7*a^3*c^5*d^5 - 2*a^3*c^3*d^7 - (6*a^2*b + b^3)*c^10 + 4*(2*a^3 + 
 3*a*b^2)*c^9*d - (9*a^2*b + 4*b^3)*c^8*d^2 - (8*a^3 - 3*a*b^2)*c^7*d^3)*c 
os(f*x + e)^3 + 3*(7*a^3*c^4*d^6 - 2*a^3*c^2*d^8 - (6*a^2*b + b^3)*c^9*d + 
 4*(2*a^3 + 3*a*b^2)*c^8*d^2 - (9*a^2*b + 4*b^3)*c^7*d^3 - (8*a^3 - 3*a*b^ 
2)*c^6*d^4)*cos(f*x + e)^2 + 3*(7*a^3*c^3*d^7 - 2*a^3*c*d^9 - (6*a^2*b + b 
^3)*c^8*d^2 + 4*(2*a^3 + 3*a*b^2)*c^7*d^3 - (9*a^2*b + 4*b^3)*c^6*d^4 - (8 
*a^3 - 3*a*b^2)*c^5*d^5)*cos(f*x + e))*sqrt(c^2 - d^2)*log((2*c*d*cos(f*x 
+ e) - (c^2 - 2*d^2)*cos(f*x + e)^2 - 2*sqrt(c^2 - d^2)*(d*cos(f*x + e) + 
c)*sin(f*x + e) + 2*c^2 - d^2)/(c^2*cos(f*x + e)^2 + 2*c*d*cos(f*x + e) + 
d^2)) + 2*(b^3*c^10*d + 6*a*b^2*c^9*d^2 + 23*a^3*c^3*d^8 - 6*a^3*c*d^10 - 
11*(3*a^2*b + b^3)*c^8*d^3 + (26*a^3 + 33*a*b^2)*c^7*d^4 + (21*a^2*b + 4*b 
^3)*c^6*d^5 - (43*a^3 + 39*a*b^2)*c^5*d^6 + 6*(2*a^2*b + b^3)*c^4*d^7 + (1 
8*a*b^2*c^11 + 6*a^2*b*c^4*d^7 - 11*a^3*c^3*d^8 - (54*a^2*b + 13*b^3)*c...
 
3.2.96.6 Sympy [F]

\[ \int \frac {(a+b \sec (e+f x))^3}{(c+d \sec (e+f x))^4} \, dx=\int \frac {\left (a + b \sec {\left (e + f x \right )}\right )^{3}}{\left (c + d \sec {\left (e + f x \right )}\right )^{4}}\, dx \]

input
integrate((a+b*sec(f*x+e))**3/(c+d*sec(f*x+e))**4,x)
 
output
Integral((a + b*sec(e + f*x))**3/(c + d*sec(e + f*x))**4, x)
 
3.2.96.7 Maxima [F(-2)]

Exception generated. \[ \int \frac {(a+b \sec (e+f x))^3}{(c+d \sec (e+f x))^4} \, dx=\text {Exception raised: ValueError} \]

input
integrate((a+b*sec(f*x+e))^3/(c+d*sec(f*x+e))^4,x, algorithm="maxima")
 
output
Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(4*c^2-4*d^2>0)', see `assume?` f 
or more de
 
3.2.96.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1572 vs. \(2 (396) = 792\).

Time = 0.43 (sec) , antiderivative size = 1572, normalized size of antiderivative = 3.82 \[ \int \frac {(a+b \sec (e+f x))^3}{(c+d \sec (e+f x))^4} \, dx=\text {Too large to display} \]

input
integrate((a+b*sec(f*x+e))^3/(c+d*sec(f*x+e))^4,x, algorithm="giac")
 
output
1/3*(3*(6*a^2*b*c^7 + b^3*c^7 - 8*a^3*c^6*d - 12*a*b^2*c^6*d + 9*a^2*b*c^5 
*d^2 + 4*b^3*c^5*d^2 + 8*a^3*c^4*d^3 - 3*a*b^2*c^4*d^3 - 7*a^3*c^2*d^5 + 2 
*a^3*d^7)*(pi*floor(1/2*(f*x + e)/pi + 1/2)*sgn(-2*c + 2*d) + arctan(-(c*t 
an(1/2*f*x + 1/2*e) - d*tan(1/2*f*x + 1/2*e))/sqrt(-c^2 + d^2)))/((c^10 - 
3*c^8*d^2 + 3*c^6*d^4 - c^4*d^6)*sqrt(-c^2 + d^2)) + 3*(f*x + e)*a^3/c^4 - 
 (18*a*b^2*c^8*tan(1/2*f*x + 1/2*e)^5 - 3*b^3*c^8*tan(1/2*f*x + 1/2*e)^5 - 
 54*a^2*b*c^7*d*tan(1/2*f*x + 1/2*e)^5 - 18*a*b^2*c^7*d*tan(1/2*f*x + 1/2* 
e)^5 - 12*b^3*c^7*d*tan(1/2*f*x + 1/2*e)^5 + 36*a^3*c^6*d^2*tan(1/2*f*x + 
1/2*e)^5 + 81*a^2*b*c^6*d^2*tan(1/2*f*x + 1/2*e)^5 + 36*a*b^2*c^6*d^2*tan( 
1/2*f*x + 1/2*e)^5 + 27*b^3*c^6*d^2*tan(1/2*f*x + 1/2*e)^5 - 60*a^3*c^5*d^ 
3*tan(1/2*f*x + 1/2*e)^5 - 18*a^2*b*c^5*d^3*tan(1/2*f*x + 1/2*e)^5 - 81*a* 
b^2*c^5*d^3*tan(1/2*f*x + 1/2*e)^5 - 12*b^3*c^5*d^3*tan(1/2*f*x + 1/2*e)^5 
 - 6*a^3*c^4*d^4*tan(1/2*f*x + 1/2*e)^5 + 9*a^2*b*c^4*d^4*tan(1/2*f*x + 1/ 
2*e)^5 + 36*a*b^2*c^4*d^4*tan(1/2*f*x + 1/2*e)^5 + 6*b^3*c^4*d^4*tan(1/2*f 
*x + 1/2*e)^5 + 45*a^3*c^3*d^5*tan(1/2*f*x + 1/2*e)^5 - 18*a^2*b*c^3*d^5*t 
an(1/2*f*x + 1/2*e)^5 + 9*a*b^2*c^3*d^5*tan(1/2*f*x + 1/2*e)^5 - 6*b^3*c^3 
*d^5*tan(1/2*f*x + 1/2*e)^5 - 6*a^3*c^2*d^6*tan(1/2*f*x + 1/2*e)^5 - 15*a^ 
3*c*d^7*tan(1/2*f*x + 1/2*e)^5 + 6*a^3*d^8*tan(1/2*f*x + 1/2*e)^5 - 36*a*b 
^2*c^8*tan(1/2*f*x + 1/2*e)^3 + 108*a^2*b*c^7*d*tan(1/2*f*x + 1/2*e)^3 + 2 
8*b^3*c^7*d*tan(1/2*f*x + 1/2*e)^3 - 72*a^3*c^6*d^2*tan(1/2*f*x + 1/2*e...
 
3.2.96.9 Mupad [B] (verification not implemented)

Time = 28.48 (sec) , antiderivative size = 15647, normalized size of antiderivative = 37.98 \[ \int \frac {(a+b \sec (e+f x))^3}{(c+d \sec (e+f x))^4} \, dx=\text {Too large to display} \]

input
int((a + b/cos(e + f*x))^3/(c + d/cos(e + f*x))^4,x)
 
output
((tan(e/2 + (f*x)/2)^5*(b^3*c^6 - 2*a^3*d^6 - 6*a*b^2*c^6 + a^3*c*d^5 + 6* 
b^3*c^5*d + 6*a^3*c^2*d^4 - 4*a^3*c^3*d^3 - 12*a^3*c^4*d^2 + 2*b^3*c^3*d^3 
 + 2*b^3*c^4*d^2 - 3*a*b^2*c^3*d^3 - 18*a*b^2*c^4*d^2 + 6*a^2*b*c^3*d^3 + 
9*a^2*b*c^4*d^2 - 6*a*b^2*c^5*d + 18*a^2*b*c^5*d))/((c^3*d - c^4)*(c + d)^ 
3) + (4*tan(e/2 + (f*x)/2)^3*(7*b^3*c^5*d - 9*a*b^2*c^6 - 3*a^3*d^6 + 11*a 
^3*c^2*d^4 - 18*a^3*c^4*d^2 + 3*b^3*c^3*d^3 - 21*a*b^2*c^4*d^2 + 3*a^2*b*c 
^3*d^3 + 27*a^2*b*c^5*d))/(3*(c + d)^2*(c^5 - 2*c^4*d + c^3*d^2)) - (tan(e 
/2 + (f*x)/2)*(2*a^3*d^6 + b^3*c^6 + 6*a*b^2*c^6 + a^3*c*d^5 - 6*b^3*c^5*d 
 - 6*a^3*c^2*d^4 - 4*a^3*c^3*d^3 + 12*a^3*c^4*d^2 - 2*b^3*c^3*d^3 + 2*b^3* 
c^4*d^2 - 3*a*b^2*c^3*d^3 + 18*a*b^2*c^4*d^2 - 6*a^2*b*c^3*d^3 + 9*a^2*b*c 
^4*d^2 - 6*a*b^2*c^5*d - 18*a^2*b*c^5*d))/((c + d)*(3*c^5*d - c^6 + c^3*d^ 
3 - 3*c^4*d^2)))/(f*(tan(e/2 + (f*x)/2)^2*(3*c*d^2 - 3*c^2*d - 3*c^3 + 3*d 
^3) - tan(e/2 + (f*x)/2)^4*(3*c*d^2 + 3*c^2*d - 3*c^3 - 3*d^3) + 3*c*d^2 + 
 3*c^2*d + c^3 + d^3 - tan(e/2 + (f*x)/2)^6*(3*c*d^2 - 3*c^2*d + c^3 - d^3 
))) - (2*a^3*atan(((a^3*((a^3*((8*(4*a^3*c^21 + 2*b^3*c^21 + 12*a^2*b*c^21 
 - 16*a^3*c^20*d - 2*b^3*c^20*d - 4*a^3*c^8*d^13 + 2*a^3*c^9*d^12 + 26*a^3 
*c^10*d^11 - 14*a^3*c^11*d^10 - 70*a^3*c^12*d^9 + 30*a^3*c^13*d^8 + 110*a^ 
3*c^14*d^7 - 30*a^3*c^15*d^6 - 110*a^3*c^16*d^5 + 20*a^3*c^17*d^4 + 64*a^3 
*c^18*d^3 - 12*a^3*c^19*d^2 + 8*b^3*c^12*d^9 - 8*b^3*c^13*d^8 - 22*b^3*c^1 
4*d^7 + 22*b^3*c^15*d^6 + 18*b^3*c^16*d^5 - 18*b^3*c^17*d^4 - 2*b^3*c^1...